package com.amos.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Amos
 * @ClassName QueryController
 * @Description TODO
 * @Date 2018/12/4 21:05
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/query")
public class QueryController {
    @Autowired
    EurekaClientConfigBean clientConfigBean;

    @GetMapping("/eureka-server")
    public Object getEurekaServerUrl(){
        return clientConfigBean.getServiceUrl();
    }
}
